<?php
/*!
Application_Form_Login
EXTENDS Zend_Form

*/

class Application_Form_Login extends Zend_Form
{

    public function init()
    {
		//! Defines form elements.\n
		
        /* Form Elements & Other Definitions Here ... */
    	// added 'required' = false to $login
    	// may want to add a trim + tolower for username? trim for pass? and no spaces/weird chars -andylt
	$this->setMethod("post");
	$this->addElement('text','username',array('label'=>'Username','required'=>true));
	$this->addElement('password','password',array('label'=>'Password','required'=>true));
	$this->addElement('submit','login',array('label'=>'Log In','required'=>false,'ignore'=>true));
    
	// We want to display a 'failed authentication' message if necessary;
    // we'll do that with the form 'description', so we need to add that
    // decorator.
    	$this->setDecorators(array('FormElements',array('HtmlTag',array('tag'=>'dl','class'=>'zend_form')),array('Description',array('placement'=>'prepend')),'Form'));
    }
}

